package com.hpeu_01.day0121.homework;

import java.io.*;
import java.util.ArrayList;

public class Test03 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("hello");
        list.add("java");
        list.add("html");
        try(
                Writer w = new FileWriter("D:\\project\\JAVA\\java\\JavaSE\\src\\com\\hpeu_01\\day0121\\homework\\a.txt",true);
        ){
            for (String s : list) {
                w.write(s);
            }
        }catch(IOException e){
            e.printStackTrace();
        }
    }
}
